import { post } from '../ajax'
import { getAjaxBaseUrl } from '../handler'
import type { AjaxPagingResult } from '@/types'

const controller = getAjaxBaseUrl('/warningProcess', '/energy')

/** 添加预警处理信息 */
export function addWarningProcess(data: {
  id: number
  processState: string
  processContent: string
}) {
  return post(`${controller}/addWarningProcess`, data)
}

/** 预警信息处理查询 */
export function getEarlyWarningProcessList(data: {
  pageNumber: number
  pageSize: number
  earlyWarningType?: string
}) {
  return post<AjaxPagingResult>(`${controller}/getEarlyWarningProcessList`, data)
}

/** 处理预警信息 */
export function processWarning(data: {
  warningId: number
  processState: string
  processContent: string
}) {
  return post(`${controller}/processWarning`, data)
}
